using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUS;
using Utility;
using Entities;
public partial class Admin_Chitiettour : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    private void LoadData()
    {

        try
        {
            int id = int.Parse(Request.QueryString["id"].ToString());
            lit_mat .Text = id.ToString();

            tbTour tour = tbTourBUS.GetByID(id);
            lit_tent .Text = tour.Tentour;

            tbLoaitour  lt = tbLoaitourBUS .GetByID(tour .Maloaitour );
            lit_lt   .Text = lt.Tenloaitour ;


           
            lit_tg .Text = tour.Thoigian;
            lit_pt .Text = tour.Phuongtien;
            lit_g .Text = tour.Gia.ToString();
            lit_kh .Text = tour.Khoihanh;

            txt_mota.Text = tour.Mota;

            img_hinh.ImageUrl = "~/Hinhanh/Hinh/" + tour.Hinh;


        }
        catch
        {
            Response.Redirect("~/Admin/Danhsachtour.aspx");
        }
    }
}
